home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
015a
/
do1003.zip
/
USBBSBRD.SCR
< prev
Wrap
Text File
|
1991-12-11
|
4KB
|
108 lines
*┌────────────────────────────────────────────────────────────┐
*│ SCRIPT: USBBSBRD.SCR │
*│ Searches the USBBS list and selects boards running │
*│ specific software. │
*│ (Demonstrates techniques for working with files and │
*│ the use of functions.) │
*└────────────────────────────────────────────────────────────┘
/STOP End
.clr
»ye«USBBS National BBS list Processor»#«
/BOX 1 1 80 3 11 7 ""
.wi 1 4 80 25
* Check to see if the list is in the current directory.
/EXIST USBBS.LST
:EXISTERROR
* Board list does not exist. Tell the user and exit.
.bell
USBBS.LST not found in the current directory!
.pg
/GOTO End
:EXISTOK
* USBBS.LST was found, so process it:
»bo«TYPE CODES »#«
A = Auntie O = Opus/Maximus
B = PCBoard P = GT PowerComm
C = Phoenix/Collie/Collosus Q = QuickBBS/RemoteAccess
D = dBBS S = Searchlight
F = Spitfire T = TBBS or TCOMM
G = GAP U = UltraBBS
H = PC-Host V = WWIV
I = Magpie W = Wildcat
J = SuperBBS X = BBS-PC,RyBBS,ROS,Fido,Citadel,Osiris,
L = Telegard or custom, unverified or unknown type
M = OraComm/Major/Galacticomm Y = T.A.G.
N = Genesis Z = TPBoard
/GETC " Board:" ABCDFGHIJLMNOPQSTUVWXYZ~027
/IF %char NE ~027 End
* Since CHAR is used by multiple functions, be sure to move it to a
* variable to assure that it will be held.
/SET BD %CHAR
/MATH BoardsProcessed 0
/MATH BoardsSelected 0
.clr
»ye« Processing Board: »c 14 1«%BD»#« [Press »bo«<esc>»#« to abort]
/DRAW H 2 2 78
* Set the working window
.wi 1 7 80 25
* Open the files for reading and writing. Note, if USBBS.OUT exists
* it will be backed up.
/OPEN 1 USBBS.LST R
* rename the file if it exists
/ERASE USBBS.BAK N
/RENAME USBBS.OUT USBBS.BAK N
/OPEN 2 USBBS.OUT W
:ReadHeading
/READ 1 | Line
* The inkey function allows us to stop while the script is processing
/INKEY ~027 EOF
* Use the reset option to make sure the PagePrompt is not displayed
.reset
%FileBuffer
* Ignore all lines before the heading
/IF %FileBuffer LK "----------*" ReadHeading
:ReadRecord
/READ 1 | Line
/INC BoardsProcessed
/INKEY ~027 EOF
/IF @cpy(%FileBuffer,46,1) EQ %BD CheckRecord
/INC BoardsSelected
.reset
* Display the matched line in reversed video. The L79 assures that the
* reverse video goes across the entire screen rather than ending at a
* short line.
»bo«%FileBuffer(L79)»#«
/SET Phone @cpy(%FileBuffer,1,28)
/SET Name @trim(@cpy(%FileBuffer,59,21)," 1234567890/?",R)
/SET SoftWare @cpy(%FileBuffer,46,2)
/SET Speed @cpy(%FileBuffer,51,3)
/WRITE 2 "%Phone %Name(L21) %SoftWare(L2) %Speed"
/GOTO ReadRecord
:CheckRecord
* Stop when the bottom line is found
/IF %FileBuffer NL "----------*" EOF
.reset
%FileBuffer
/GOTO ReadRecord
:EOF
:End
/CLOSE 1
/CLOSE 2
* reset the window and assure that the prompt appears at the bottom
* of the page if the script is run from interactive mode
.wi full go 1 25
/MATH Percent (%BoardsSelected/%BoardsProcessed)*100
/DRAW H {Y} 2 78
»ma« Boards Processed»gy« :»wh« %BoardsProcessed
»ma« Boards Selected»gy« :»wh« %BoardsSelected»#« [%Percent(##.#)%]
* End the script and clear all the variables used
/ENDEXEC CLEAR